<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>
<div>
    <logic:present name="acc">
        <logic:present name="listFunction">
            <logic:notEmpty name="listFunction">
                <logic:present name="orderDTO">
                    <logic:notEmpty name="orderDTO">
                        <br><h2>List order </h2>
                        <table width="100%" border="0">
                            <tr bgcolor="#C2D1D8">
                                <td>Id</td>
                                <td>Order date</td>
                                <td>Amount</td>
                                <td>Cusid</td>
                                <td>Full name </td>
                                <td>Email</td>
                                <td>Phone</td>
                                <td>Address</td>
                                <td>Action</td>
                            </tr>
                            <logic:iterate name="orderDTO" id="orderDTO" >
                                <tr bgcolor="#F0F0F0">
                                    <td><bean:write name="orderDTO" property="orderId"/></td>
                                    <td><bean:write name="orderDTO" property="orderDate"/></td>
                                    <td><bean:write name="orderDTO" property="amount"/></td>
                                    <td><bean:write name="orderDTO" property="cusDTO.customerId"/></td>
                                    <td><bean:write name="orderDTO" property="cusDTO.fullName"/></td>
                                    <td><bean:write name="orderDTO" property="cusDTO.email"/></td>
                                    <td><bean:write name="orderDTO" property="cusDTO.phone"/></td>
                                    <td><bean:write name="orderDTO" property="cusDTO.address"/></td>
                                    <td>
                                        <a href="AdminCar.do?action=acceptCarOrder&id=<bean:write name="orderDTO" property="orderId"/>">accept</a>&ensp;&ensp; <a href="AdminCar.do?action=removeCarOrder&id=<bean:write name="orderDTO" property="orderId"/>">remove</a>
                                    </td>
                                </tr>
                            </logic:iterate>
                                <tr bgcolor="#C2D1D8">
                                    <td colspan="9"><font color="#C2D1D8">Id</font></td>

                            </tr>
                        </table>
                    </logic:notEmpty>
                    <logic:empty name="orderDTO">
                        <br> not order now date
                    </logic:empty>
                </logic:present>
            </logic:notEmpty>
            <logic:empty name="listFunction">
                ban chi dc xem thong tin ma thoi
            </logic:empty>
        </logic:present>
        <logic:notPresent name="listFunction">
            ban chi dc xem thong tin ma thoi
        </logic:notPresent>
    </logic:present>
    <logic:notPresent name="acc">
        <jsp:forward page="adminHome.jsp"/>
    </logic:notPresent>
</div>